<style>
    .layui-form .layui-form-item .layui-inline .layui-form-label {
        width: 200px;
        font-size: 18px;
        font-weight: bold;
    }
    .layui-form .layui-form-item .layui-inline .layui-input-inline input{
        width: 800px;
        font-size: 16px;
    }
</style>
<form class="layui-form  seller-alone-form" id="userAction" style="padding:20px;height: 800px;">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>
            <a href="{:url('usdtFund')}" style="color: #428bca;font-weight:bold;" >Usdt 充值日志</a> / 超额等处理
        </legend>
    </fieldset>
    <br/>
    <br/>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">用户名：</label>
            <div class="layui-input-inline" style="width: 300px;">
                <input type="text" readonly value="{$username}" style="border: 0;color: red" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">充入用户金额：</label>
            <div class="layui-input-inline" style="width: 300px;">
                <input type="text" readonly value="{$list.amount}" style="border: 0;color: red" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">实际付款金额：</label>
            <div class="layui-input-inline" style="width: 300px;">
                <input type="text" readonly value="{$list.amount_real}" style="border: 0;color: red" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">订单号：</label>
            <div class="layui-input-inline" style="width: 300px;">
                <input type="text" readonly value="{$list.out_trade_no}" style="border: 0;color: red" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline" >
            <label class="layui-form-label">对应实付爬虫日志：</label>
            <div class="layui-input-inline" style="width: 800px;">
                <select name="ok_history" id="ok_history" lay-filter="ok_history"  lay-verType="tips" >
                    <option value="">选择已付款成功日志(如没有选项,则说明爬虫日志中没有对应的付款记录)</option>
                    {if !empty($list_array)}
                        {foreach $list_array as $v}
                        <option value="{$v.id}">{$v.ctime} , 付款金额:$ {$v.amount} , {$v.txid}</option>
                        {/foreach}
                    {/if}
                </select>
            </div>
        </div>
    </div>

    <div class="layui-form-item" style="padding-top: 50px;">
        <div class="layui-input-block">
            <input type="hidden" name="usdt_fund_id" id="usdt_fund_id" value="{$usdt_fund_id}">
            <button type="button" class="layui-btn" lay-submit lay-filter="save">确认充值</button>
            <a href="{:url('usdtFund')}" class="layui-btn layui-btn-primary" >{:lang('返回')}</a>
        </div>
    </div>
</form>

<script>
    layui.use(['form','table'], function () {
        var form = layui.form,
            table = layui.table; //表格

        form.on('submit(save)', function(data){
            layer.confirm("您确定'确认充值么'?", {
                btn: ['确认', '取消'] //按钮
            }, function () {
                JsPost("{:url('usdtActionLimit')}", data.field, function(res){
                    if (res.code > 0) {
                        layer.msg(res.msg, {time: 1500, icon: 1}, function () {
                            window.location.href = "{:url('usdtFund')}";
                        });
                    } else {
                        layer.msg(res.msg, {time: 1500, icon: 2});
                    }
                });
            }, function () {
                layer.close(1);
            });
        });
    });
</script>
